package com.jt.controller;

//import io.seata.spring.annotation.GlobalTransactional;

import com.jt.pojo.Order;
import com.jt.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/testCreateOne")
public class CreateOneController {

    @Autowired
    private OrderService orderService;

    @PostMapping("/createOne")
    /*这个依赖是分布式事务依赖*/
//    @GlobalTransactional
    public boolean createOne(@RequestBody Order order) {
        return orderService.insertOrder(order);


    }
}
